package datatypes;

import java.util.NoSuchElementException;

public enum MCAction {
	NONE		(0), //NOTE (&TODO): Don't know if None is a valid action-id on clients
	
	CROUCH		(1),
	UNCROUCH	(2),
	LEAVEBED	(3),
	STARTSPRINT	(4),
	STOPSPRINT	(5);
	
	
	private int value;
	
	MCAction(int value) {
		this.value = value;
	}
	
	public static MCAction getAction(int value) {
		for(MCAction animation : values()) {
			if(animation.value == value) {
				return animation;
			}
		}
		throw new NoSuchElementException();
	}
}
